# -*- coding: utf-8 -*-
# @Time : 2019/1/2 0002 9:48
# @Author : 犯傻中
# @File : locust.py
# @Project : Python
# @title :
from locust import HttpLocust,task,TaskSet
#你瞅啥？瞅你咋地？干哈呀？

class login_test(TaskSet):
    @task
    def login(self):
        url="/agileone/index.php/common/login"
        data={'username':'admin','password':'admin','savelogin':'true'}

        res=self.client.post(url=url,data=data)

        print(res.text)

        if 'successful' in res.text:
            print('ok')
        else:
            print('ko')
